﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Data;
using ZLDC.Common.BaseUser;


namespace ZLDC.Common.Estate
{
    public class _PageBase : PageBase
    {
        protected Param info;
        protected override void OnInit(EventArgs e)
        {

            IsLogin(); info = (Param)HttpContext.Current.Session["info"];

            if (string.IsNullOrEmpty(info.m_sUserID))
            {
                Response.Write("未获得权限");
                Response.End();
            }
            base.OnInit(e);
        }

        public static void IsLogin()
        {
            if (HttpContext.Current.Session["info"] == null)
            {
                HttpContext.Current.Response.Write("<script language=\"javascript\">alert(\"权限失效!请重新登陆！\"); top.location.href=\"" + _Utility.GetAuthUrl() + "\"; </script>");
                HttpContext.Current.Response.End();
            }
        }

    }

}
